var tabActionArray = new Array();
var framesArray = new Array();
var actionMessage = new i18nMessage('../servlet/I18nMessageServlet?keyPrefix=message.action');
var logMessage = new i18nMessage('../servlet/I18nMessageServlet?keyPrefix=ui.log');

//index 2 for France Custom
var franceCustomerIndex = 2;
//index 52 for France Custom @Shop
var franceCustomerEshopIndex = 52;
//index 3 for Factory
var factoryIndex = 3;
//index 4 for Measure Specification
var measureSpecificationIndex = 4;
//index 5 for accessory
var accessoryIndex = 5;

//index 6 for photo gallery
var armorIndex = 6;

//index 31 for pantone color
var yarnIndex = 31;

//index 31 for color
var colorIndex = 30;

//index 32 for productIdentificationHistory
var historyIndex = 32;

//index 32 for reference
var stockYarnIndex = 37;

//index 38 for accessory
var stockAccessoryIndex = 38;

//index 8 for productIdentification
var productIdentificationIndex = 8;

//index 9 for productIdentificationSearch
var productIdentificationSearchIndex = 9;

//index 13 for productWorkFlow
var productWorkFlowIndex = 13;

//index 11 for productWorkFlow
var productTimeLineIndex = 11;

//index 12 for productAlarm
var productAlarmIndex = 12;

//index 15 for procurement
var procurementIndex = 15;

//index 16 for procurement
var productPackageIndex = 16;

//index 33 for procurement
var productQualityIndex = 33;

//index 29 for procurement
var productPriceIndex = 29;

//index 21 for acUser
var acUserIndex = 21;

//index 22 for acActionIndex
var acActionIndex = 22;

//index 34 for acUserActionIndex
var acUserActionIndex = 34;

//index 27 for SysMessage
var sysMessageIndex = 27;

//index 24 for Log
var logIndex = 24;

//index 25 for Illegal Log
var illegalLogIndex = 25;

//index 35 for SysMessage
var sysMenuIndex = 35;

//index 40 for order color test
var orderColorTestIndex = 40;

//index 41 for order yarn
var orderYarnIndex = 41;

//index 42 for order button
var orderButtonIndex = 42;

//index 43 for order zip
var orderZipIndex = 43;

//index 44 for order zip
var orderOthersIndex = 44;

//index 45 for order product
var orderProductIndex = 45;

//index 29 for exchange rate
var quExchangeRateIndex = 29;

// index for quotation yarn
var quYarnIndex = 46;

// index for incoterm
var quIncotermIndex = 47;

//#####################################################################################################################
var franceCustomerRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[franceCustomerIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var franceCustomerListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[franceCustomerIndex]).src = 'basic_information/france_customer_list.html';
    },
    iconCls: 'actionList'
});

var franceCustomerAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[franceCustomerIndex]).src = 'basic_information/france_customer_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[franceCustomerIndex] = [franceCustomerListAction, franceCustomerAddAction, '-', franceCustomerRefreshAction];
//#####################################################################################################################
var franceCustomerEshopRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[franceCustomerEshopIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var franceCustomerEshopListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[franceCustomerEshopIndex]).src = 'basic_information/france_customer_eshop_list.html';
    },
    iconCls: 'actionList'
});

var shopDataAction = new Ext.Action({
    text: actionMessage.get('message.action.shopdata'),
    handler: function(){
        document.getElementById(framesArray[franceCustomerEshopIndex]).src = 'basic_information/france_customer_eshop_list.html';
    },
    iconCls: 'shopDataIcon'
});

var franceCustomerEshopAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[franceCustomerEshopIndex]).src = 'basic_information/france_customer_eshop_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[franceCustomerEshopIndex] = [franceCustomerEshopListAction, franceCustomerEshopAddAction, shopDataAction, '-', franceCustomerEshopRefreshAction];
//#####################################################################################################################
var factoryRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[factoryIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var factoryListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[factoryIndex]).src = 'basic_information/factory_list.html';
    },
    iconCls: 'actionList'
});

var factoryAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[factoryIndex]).src = 'basic_information/factory_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[factoryIndex] = [factoryListAction, factoryAddAction,'-', factoryRefreshAction];
//#####################################################################################################################
var measureSpecificationRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[measureSpecificationIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var measureSpecificationListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[measureSpecificationIndex]).src = 'basic_information/measure_specification_list.html';
    },
    iconCls: 'actionList'
});

var measureSpecificationAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[measureSpecificationIndex]).src = 'basic_information/measure_specification_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[measureSpecificationIndex] = [measureSpecificationListAction, measureSpecificationAddAction,'-', measureSpecificationRefreshAction];
//#####################################################################################################################
var accessoryRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[accessoryIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var accessoryOthersListAction = new Ext.Action({
    text: actionMessage.get('message.action.accessoryothers') + '&nbsp;&nbsp;' + actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_others_list.html';
    },
    iconCls: 'actionList'
});
var accessoryOthersAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add') + '&nbsp;&nbsp;' + actionMessage.get('message.action.accessoryothers'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_others_edit.html';
    },
    iconCls: 'actionAdd'
});
var accessoryButtonListAction = new Ext.Action({
    text: actionMessage.get('message.action.accessorybutton') + '&nbsp;&nbsp;' + actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_button_list.html';
    },
    iconCls: 'actionList2'
});
var accessoryButtonAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add') + '&nbsp;&nbsp;' + actionMessage.get('message.action.accessorybutton'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_button_edit.html';
    },
    iconCls: 'actionAdd2'
});
var accessoryZipListAction = new Ext.Action({
    text: actionMessage.get('message.action.accessoryzip') + '&nbsp;&nbsp;' + actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_zip_list.html';
    },
    iconCls: 'actionList1'
});
var accessoryZipAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add') + '&nbsp;&nbsp;' + actionMessage.get('message.action.accessoryzip'),
    handler: function(){
        document.getElementById(framesArray[accessoryIndex]).src = 'basic_information/accessory_zip_edit.html';
    },
    iconCls: 'actionAdd1'
});
tabActionArray[accessoryIndex] = [accessoryButtonListAction,accessoryButtonAddAction,'-' , accessoryZipListAction,accessoryZipAddAction, '-', accessoryOthersListAction, accessoryOthersAddAction,'-', accessoryRefreshAction];
//#####################################################################################################################
var armorRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[armorIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var armorListAction = new Ext.Action({
    text: actionMessage.get('message.action.listarmor'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/armor_list.html';
    },
    iconCls: 'actionList'
});

var armorAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addarmor'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/armor_edit.html';
    },
    iconCls: 'actionAdd'
});

var sketchListAction = new Ext.Action({
    text: actionMessage.get('message.action.listsketch'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/sketch_list.html';
    },
    iconCls: 'actionList'
});
var sketchAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addsketch'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/sketch_edit.html';
    },
    iconCls: 'actionAdd'
});

var swatchListAction = new Ext.Action({
    text: actionMessage.get('message.action.listswatch'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/swatch_list.html';
    },
    iconCls: 'actionList'
});
var swatchAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addswatch'),
    handler: function(){
        document.getElementById(framesArray[armorIndex]).src = 'basic_information/swatch_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[armorIndex] = [armorListAction, armorAddAction,'-', sketchListAction, sketchAddAction, '-', swatchListAction, swatchAddAction ,'-', armorRefreshAction];
//#####################################################################################################################
var yarnRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[yarnIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var yarnListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[yarnIndex]).src = 'basic_information/yarn_list.html';
    },
    iconCls: 'actionList'
});

var yarnAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[yarnIndex]).src = 'basic_information/yarn_edit.html';
    },
    iconCls: 'actionAdd'
});
tabActionArray[yarnIndex] = [yarnListAction, yarnAddAction,'-', yarnRefreshAction];

//#####################################################################################################################
var historyListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
		 document.getElementById(framesArray[historyIndex]).src = 'product/product_identification_history_list.html';
    },
    iconCls: 'actionList'
});

var historyRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[historyIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});

tabActionArray[historyIndex] = [historyListAction, '-' ,historyRefreshAction];
//#####################################################################################################################
var colorRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[colorIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});

var dzColorListAction = new Ext.Action({
    text: actionMessage.get('message.action.listdzcolor'),
    handler: function(){
        document.getElementById(framesArray[colorIndex]).src = 'basic_information/dz_color_list.html';
    },
    iconCls:'actionList'
});

var dzColorAddAction = new Ext.Action({
    text: actionMessage.get('message.action.adddzcolor'),
    handler: function(){
        document.getElementById(framesArray[colorIndex]).src = 'basic_information/dz_color_edit.html';
    },
    iconCls: 'actionAdd'
});

var pantoneColorListAction = new Ext.Action({
    text: actionMessage.get('message.action.listpantone'),
    handler: function(){
        document.getElementById(framesArray[colorIndex]).src = 'basic_information/pantone_color_list.html';
    },
    iconCls: 'actionList'
});

var pantoneColorAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addpantone'),
    handler: function(){
        document.getElementById(framesArray[colorIndex]).src = 'basic_information/pantone_color_edit.html';
    },
    iconCls: 'actionAdd'
});
tabActionArray[colorIndex] = [dzColorListAction,dzColorAddAction, '-', pantoneColorListAction, pantoneColorAddAction,'-', colorRefreshAction];
//#####################################################################################################################
var stockYarnListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[stockYarnIndex]).src = 'stock/yarn_stock_list.html';
    },
    iconCls:'actionList'
});
var stockYarnRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[stockYarnIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
tabActionArray[stockYarnIndex] = [stockYarnListAction, '-' ,stockYarnRefreshAction];
//#####################################################################################################################
var stockAccessoryRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[stockAccessoryIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});

var stockButtonAction = new Ext.Action({
    text: actionMessage.get('message.action.buttonstock'),
    handler: function(){
		document.getElementById(framesArray[stockAccessoryIndex]).src = 'stock/accessory_button_stock_list.html';
    },
    iconCls: 'actionList'
});

var stockZipAction = new Ext.Action({
    text: actionMessage.get('message.action.zipstock'),
    handler: function(){
		document.getElementById(framesArray[stockAccessoryIndex]).src = 'stock/accessory_zip_stock_list.html';
    },
    iconCls: 'actionList'
});

var stockOthersAction = new Ext.Action({
    text: actionMessage.get('message.action.othersstock'),
    handler: function(){
		document.getElementById(framesArray[stockAccessoryIndex]).src = 'stock/accessory_others_stock_list.html';
    },
    iconCls: 'actionList'
});
tabActionArray[stockAccessoryIndex] = [stockButtonAction,stockZipAction,stockOthersAction, '-', stockAccessoryRefreshAction];
//#####################################################################################################################
var productIdentificationRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productIdentificationIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productIdentificationListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productIdentificationIndex]).src = 'product/product_identification_list.html';
    },
    iconCls: 'actionList'
});

var productIdentificationAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[productIdentificationIndex]).src = 'product/product_identification_edit.html';
    },
    iconCls: 'actionAdd'
});

var productIdentificationAddKnittingAction = new Ext.Action({
    text: actionMessage.get('message.action.addknitting'),
    handler: function(){
        document.getElementById(framesArray[productIdentificationIndex]).src = 'product/product_identification_edit.html';
    },
    iconCls: 'actionAdd'
});

var productIdentificationAddSuitAction = new Ext.Action({
    text: actionMessage.get('message.action.addsuit'),
    handler: function(){
        document.getElementById(framesArray[productIdentificationIndex]).src = 'product/product_identification_wl_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[productIdentificationIndex] = [productIdentificationListAction, productIdentificationAddAction, '-', productIdentificationRefreshAction];
//#####################################################################################################################
var productIdentificationSearchRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productIdentificationSearchIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});

tabActionArray[productIdentificationSearchIndex] = [productIdentificationSearchRefreshAction];
//#####################################################################################################################
var productWorkFlowRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productWorkFlowIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productWorkFlowListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productWorkFlowIndex]).src = 'product/product_work_flow_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[productWorkFlowIndex] = [productWorkFlowListAction, '-', productWorkFlowRefreshAction];
//#####################################################################################################################
var productTimeLineRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productTimeLineIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productTimeLineListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productTimeLineIndex]).src = 'product/product_time_line_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[productTimeLineIndex] = [productTimeLineListAction, '-', productTimeLineRefreshAction];
//#####################################################################################################################
var productAlarmRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productAlarmIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productAlarmListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productAlarmIndex]).src = 'product/product_alarm_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[productAlarmIndex] = [productAlarmListAction,'-',  productAlarmRefreshAction];
//#####################################################################################################################
var procurementRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[procurementIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var procurementListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[procurementIndex]).src = 'procurement_stat/procurement_list.html';
    },
    iconCls: 'actionList'
});
var procurementAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[procurementIndex]).src = 'procurement_stat/procurement_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[procurementIndex] = [procurementListAction, procurementAddAction,'-',  procurementRefreshAction];

//#####################################################################################################################
var productPackageRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productPackageIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productPackageListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productPackageIndex]).src = 'procurement_stat/product_package_list.html';
    },
    iconCls: 'actionList'
});
var productPackageAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[productPackageIndex]).src = 'procurement_stat/product_package_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[productPackageIndex] = [productPackageListAction, productPackageAddAction,'-',  productPackageRefreshAction];

//#####################################################################################################################
var productQualityRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productQualityIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productQualityListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productQualityIndex]).src = 'procurement_stat/product_quality_list.html';
    },
    iconCls: 'actionList'
});
var productQualityAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[productQualityIndex]).src = 'procurement_stat/product_quality_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[productQualityIndex] = [productQualityListAction, productQualityAddAction, '-', productQualityRefreshAction];

//#####################################################################################################################
var productPriceRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[productPriceIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var productPriceListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[productPriceIndex]).src = 'product/product_price_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[productPriceIndex] = [productPriceListAction, '-',  productPriceRefreshAction];

//#####################################################################################################################
var acUserRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[acUserIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var acUserListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[acUserIndex]).src = 'access_control/ac_user_list.html';
    },
    iconCls: 'actionList'
});
var acUserAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[acUserIndex]).src = 'access_control/ac_user_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[acUserIndex] = [acUserListAction, acUserAddAction,'-',  acUserRefreshAction];

//#####################################################################################################################
var acActionRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[acActionIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var acActionListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[acActionIndex]).src = 'access_control/ac_action_list.html';
    },
    iconCls: 'actionList'
});
var acActionAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[acActionIndex]).src = 'access_control/ac_action_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[acActionIndex] = [acActionListAction, acActionAddAction,'-',  acActionRefreshAction];

//#####################################################################################################################
var acUserActionRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[acUserActionIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var acUserActionListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[acUserActionIndex]).src = 'access_control/ac_user_action_list.html';
    },
    iconCls: 'actionList'
});
var acUserActionAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[acUserActionIndex]).src = 'access_control/ac_user_action_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[acUserActionIndex] = [acUserActionListAction, acUserActionAddAction,'-',  acUserActionRefreshAction];

//#####################################################################################################################
var logRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[logIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var logListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[logIndex]).src = 'log/log_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[logIndex] = [logListAction, '-',  logRefreshAction];

//#####################################################################################################################
var illegalLogRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[illegalLogIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var illegalRightLogAction = new Ext.Action({
    text: logMessage.get('ui.log.rightlogtitle'),
    handler: function(){
        document.getElementById(framesArray[illegalLogIndex]).src = 'log/log_illegal_right_list.html';
    },
    iconCls: 'actionList'
});

var illegalTimeLogAction = new Ext.Action({
    text: logMessage.get('ui.log.timelogtitle'),
    handler: function(){
        document.getElementById(framesArray[illegalLogIndex]).src = 'log/log_illegal_time_list.html';
    },
    iconCls: 'actionList'
});

var illegalZoneLogAction = new Ext.Action({
    text: logMessage.get('ui.log.zonelogtitle'),
    handler: function(){
        document.getElementById(framesArray[illegalLogIndex]).src = 'log/log_illegal_zone_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[illegalLogIndex] = [illegalRightLogAction, '-', illegalTimeLogAction , '-', illegalZoneLogAction, '-',  illegalLogRefreshAction];
//#####################################################################################################################
var orderColorTestRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderColorTestIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderColorTestListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[orderColorTestIndex]).src = 'order/order_color_test_list.html';
    },
    iconCls: 'actionList'
});
var orderColorTestAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[orderColorTestIndex]).src = 'order/order_color_test_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[orderColorTestIndex] = [orderColorTestListAction, orderColorTestAddAction,'-',  orderColorTestRefreshAction];
//#####################################################################################################################
var orderYarnRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderYarnIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderYarnListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[orderYarnIndex]).src = 'order/order_yarn_list.html';
    },
    iconCls: 'actionList'
});
var orderYarnAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[orderYarnIndex]).src = 'order/order_yarn_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[orderYarnIndex] = [orderYarnListAction, orderYarnAddAction,'-',  orderYarnRefreshAction];

//#####################################################################################################################
var orderButtonRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderButtonIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderButtonListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[orderButtonIndex]).src = 'order/order_button_list.html';
    },
    iconCls: 'actionList'
});
var orderButtonAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[orderButtonIndex]).src = 'order/order_button_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[orderButtonIndex] = [orderButtonListAction, orderButtonAddAction,'-',  orderButtonRefreshAction];

//#####################################################################################################################
var orderZipRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderZipIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderZipListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[orderZipIndex]).src = 'order/order_zip_list.html';
    },
    iconCls: 'actionList'
});
var orderZipAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[orderZipIndex]).src = 'order/order_zip_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[orderZipIndex] = [orderZipListAction, orderZipAddAction,'-',  orderZipRefreshAction];

//#####################################################################################################################
var orderOthersRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderOthersIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderOthersListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[orderOthersIndex]).src = 'order/order_others_list.html';
    },
    iconCls: 'actionList'
});
var orderOthersAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[orderOthersIndex]).src = 'order/order_others_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[orderOthersIndex] = [orderOthersListAction, orderOthersAddAction,'-',  orderOthersRefreshAction];

//#####################################################################################################################
var orderProductRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[orderProductIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var orderProductListAction = new Ext.Action({
    text: actionMessage.get('message.action.listcustomerorder'),
    handler: function(){
        document.getElementById(framesArray[orderProductIndex]).src = 'order/order_product_list.html';
    },
    iconCls: 'actionList'
});
var orderProductAddAction = new Ext.Action({
    text: actionMessage.get('message.action.editcustomerorder'),
    handler: function(){
        document.getElementById(framesArray[orderProductIndex]).src = 'order/order_product_edit.html';
    },
    iconCls: 'actionAdd'
});
var orderEshopAction = new Ext.Action({
    text: actionMessage.get('message.action.listeshoporder'),
    handler: function(){
        document.getElementById(framesArray[orderProductIndex]).src = 'order/order_product_edit.html';
    },
    iconCls: 'actionEshop'
});
var orderStatisticsAction = new Ext.Action({
    text: actionMessage.get('message.action.orderstatistics'),
    handler: function(){
        document.getElementById(framesArray[orderProductIndex]).src = 'order/order_product_statistics.html';
    },
    iconCls: 'actionOrderStatistics'
});

tabActionArray[orderProductIndex] = [orderProductListAction, orderProductAddAction,'-',orderEshopAction,'-',orderStatisticsAction,'-',  orderProductRefreshAction];

//#####################################################################################################################
var quExchangeRateRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[quExchangeRateIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var quExchangeRateListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[quExchangeRateIndex]).src = 'quotation/exchange_rate_list.html';
    },
    iconCls: 'actionList'
});
var quExchangeRateAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[quExchangeRateIndex]).src = 'quotation/exchange_rate_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[quExchangeRateIndex] = [quExchangeRateListAction, quExchangeRateAddAction,'-',  quExchangeRateRefreshAction];

//#####################################################################################################################
var quIncotermRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[quIncotermIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var quIncotermListAction = new Ext.Action({
    text: actionMessage.get('message.action.listintoterm'),
    handler: function(){
        document.getElementById(framesArray[quIncotermIndex]).src = 'quotation/incoterm_list.html';
    },
    iconCls: 'actionList'
});
var quIncotermAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addintoterm'),
    handler: function(){
        document.getElementById(framesArray[quIncotermIndex]).src = 'quotation/incoterm_edit.html';
    },
    iconCls: 'actionAdd'
});
var quDeliveryListAction = new Ext.Action({
    text: actionMessage.get('message.action.listdelivery'),
    handler: function(){
        document.getElementById(framesArray[quIncotermIndex]).src = 'quotation/delivery_list.html';
    },
    iconCls: 'actionList'
});
var quDeliveryAddAction = new Ext.Action({
    text: actionMessage.get('message.action.adddelivery'),
    handler: function(){
        document.getElementById(framesArray[quIncotermIndex]).src = 'quotation/delivery_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[quIncotermIndex] = [quIncotermListAction, quIncotermAddAction,'-',quDeliveryListAction, quDeliveryAddAction,'-',  quIncotermRefreshAction];

//#####################################################################################################################
var quYarnRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[quYarnIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var quYarnListAction = new Ext.Action({
    text: actionMessage.get('message.action.listquyarn'),
    handler: function(){
        document.getElementById(framesArray[quYarnIndex]).src = 'quotation/yarn_list.html';
    },
    iconCls: 'actionList'
});
var quYarnAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addquyarn'),
    handler: function(){
        document.getElementById(framesArray[quYarnIndex]).src = 'quotation/yarn_edit.html';
    },
    iconCls: 'actionAdd'
});
var quTrimmingListAction = new Ext.Action({
    text: actionMessage.get('message.action.listqutrimming'),
    handler: function(){
        document.getElementById(framesArray[quYarnIndex]).src = 'quotation/trimming_list.html';
    },
    iconCls: 'actionList'
});
var quTrimmingAddAction = new Ext.Action({
    text: actionMessage.get('message.action.addqutrimming'),
    handler: function(){
        document.getElementById(framesArray[quYarnIndex]).src = 'quotation/trimming_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[quYarnIndex] = [quYarnListAction, quYarnAddAction,'-',quTrimmingListAction, quTrimmingAddAction,'-',  quYarnRefreshAction];































//#####################################################################################################################
var sysMessageRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[sysMessageIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var sysMessageListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[sysMessageIndex]).src = 'assistant_information/system_label_list.html';
    },
    iconCls: 'actionList'
});

var sysMessageAddAction = new Ext.Action({
    text: actionMessage.get('message.action.add'),
    handler: function(){
        document.getElementById(framesArray[sysMessageIndex]).src = 'assistant_information/system_label_edit.html';
    },
    iconCls: 'actionAdd'
});

tabActionArray[sysMessageIndex] = [sysMessageListAction, sysMessageAddAction, '-', sysMessageRefreshAction];

//#####################################################################################################################
var sysMenuRefreshAction = new Ext.Action({
    text: actionMessage.get('message.action.refresh'),
    handler: function(){
		var frame = document.getElementById(framesArray[sysMenuIndex]);
		frame.contentWindow.location.reload();
    },
    iconCls: 'actionRefresh'
});
var sysMenuListAction = new Ext.Action({
    text: actionMessage.get('message.action.list'),
    handler: function(){
        document.getElementById(framesArray[sysMenuIndex]).src = 'assistant_information/menu_label_list.html';
    },
    iconCls: 'actionList'
});

tabActionArray[sysMenuIndex] = [sysMenuListAction, '-', sysMenuRefreshAction];




var getTabAction = function(frameId, menuId){
	framesArray[menuId] = frameId;
	return tabActionArray[menuId];
}
